#!/bin/bash
exec rg -S --color=never '^(?P<dirname>[/]*?([^/]+/)+)(?P<basename>.*?(?P<ext>[.][^/]+))' -o --replace "${@:-'$dirname$basename'}"

